﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace JX.Application
{
	/// <summary>
	/// 用户资金、积分、有效期和点券的管理接口
	/// </summary>
	/// <typeparam name="T"></typeparam>
	public interface IEncourageStrategy<T>
	{
		/// <summary>
		/// 为所有会员增加
		/// </summary>
		/// <param name="howMany">正数为增加的数量，负数为减少的数量</param>
		/// <param name="reason">备注</param>
		/// <param name="memo">内部记录</param>
		/// <returns></returns>
		bool IncreaseForAll(T howMany, string reason, string memo);
		/// <summary>
		/// 为所有会员增加
		/// </summary>
		/// <param name="howMany">正数为增加的数量，负数为减少的数量</param>
		/// <param name="reason">备注</param>
		/// <param name="memo">内部记录</param>
		/// <returns></returns>
		Task<bool> IncreaseForAllAsync(T howMany, string reason, string memo);

		/// <summary>
		/// 为指定的会员组增加
		/// </summary>
		/// <param name="groups">会员组ID集合</param>
		/// <param name="howMany">正数为增加的数量，负数为减少的数量</param>
		/// <param name="reason">备注</param>
		/// <param name="memo">内部记录</param>
		/// <returns></returns>
		bool IncreaseForGroup(string groups, T howMany, string reason, string memo);
		/// <summary>
		/// 为指定的会员组增加
		/// </summary>
		/// <param name="groups">会员组ID集合</param>
		/// <param name="howMany">正数为增加的数量，负数为减少的数量</param>
		/// <param name="reason">备注</param>
		/// <param name="memo">内部记录</param>
		/// <returns></returns>
		Task<bool> IncreaseForGroupAsync(string groups, T howMany, string reason, string memo);

		/// <summary>
		/// 为指定的会员名增加
		/// </summary>
		/// <param name="toUser">会员名集合</param>
		/// <param name="howMany">正数为增加的数量，负数为减少的数量</param>
		/// <param name="reason">备注</param>
		/// <param name="memo">内部记录</param>
		/// <returns></returns>
		bool IncreaseForUsers(string toUser, T howMany, string reason, string memo);
		/// <summary>
		/// 为指定的会员名增加
		/// </summary>
		/// <param name="toUser">会员名集合</param>
		/// <param name="howMany">正数为增加的数量，负数为减少的数量</param>
		/// <param name="reason">备注</param>
		/// <param name="memo">内部记录</param>
		/// <returns></returns>
		Task<bool> IncreaseForUsersAsync(string toUser, T howMany, string reason, string memo);

		/// <summary>
		/// 为指定的会员ID增加
		/// </summary>
		/// <param name="toUser">会员ID集合</param>
		/// <param name="howMany">正数为增加的数量，负数为减少的数量</param>
		/// <param name="reason">备注</param>
		/// <param name="memo">内部记录</param>
		/// <returns></returns>
		bool IncreaseForUserID(string toUser, T howMany, string reason, string memo);
		/// <summary>
		/// 为指定的会员ID增加
		/// </summary>
		/// <param name="toUser">会员ID集合</param>
		/// <param name="howMany">正数为增加的数量，负数为减少的数量</param>
		/// <param name="reason">备注</param>
		/// <param name="memo">内部记录</param>
		/// <returns></returns>
		Task<bool> IncreaseForUserIDAsync(string toUser, T howMany, string reason, string memo);
	}
}
